<?php

require 'util/xhtml.php';

function editForumForm( $forum ) {
  echo <<<EOO
        <form action="./gulp.php" method="post" >
          <input type="hidden" name="type" value="FORUM" />
          <input type="hidden" name="fnum" value="${forum['id']}" />
          <input type="text" name="title" value="${forum['title']}" />
          <input type="text" name="datum" value="${forum['datum']}" />
          <input type="submit" name="action[edit]" value="save" />
        </form>
EOO;
  echo linkAt('gulp.php', array( 'type' => 'FORUM', 'action[delete]' => 'true', 'fnum' => $forum['id'] ), 'DeL33T' ); 
}
function newForumForm() {
  echo <<<EOO
        <form action="./gulp.php" method="post" >
          <input type="hidden" name="type" value="FORUM" />
          <input type="hidden" name="fnum" value="-1" />
          <input type="text" name="title" value="" />
          <input type="text" name="datum" value="" />
          <input type="submit" name="action[new]" value="new" />
        </form>
EOO;
}

?>
